﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Diagnostics;


namespace Auction_Boxing_2
{
    public abstract class State
    {

        protected Texture2D Texture;
        protected BoxingPlayer player;
        protected bool isActive;
        protected Animation playeranimation;
        protected Dictionary<string, Animation> ATextures;
        protected Vector2 speed;
        protected Color color;

        public Animation PlayerAnimation
        {
            get
            {
                return playeranimation;
            }
            set
            {
                playeranimation = value;
            }
        }

        public bool isKeyDown(KeyPressed key)
        {
            return StatePlayer.KeysDown.Contains(key);
        }

        public bool areKeysDown(KeyPressed key1, KeyPressed key2)
        {
            return StatePlayer.isKeyDown(key1) && StatePlayer.isKeyDown(key2);
        }

        public bool areKeysDown(KeyPressed key1, KeyPressed key2, KeyPressed key3)
        {
            return StatePlayer.isKeyDown(key1) && StatePlayer.isKeyDown(key2) && StatePlayer.isKeyDown(key3);
        }

        public bool isOneOfTheseDown(KeyPressed key1, KeyPressed key2)
        {
            return StatePlayer.isKeyDown(key1) || StatePlayer.isKeyDown(key2);
        }

        public bool isOneOfTheseDown(KeyPressed key1, KeyPressed key2, KeyPressed key3)
        {
            return StatePlayer.isKeyDown(key1) || StatePlayer.isKeyDown(key2) || StatePlayer.isKeyDown(key3);
        }

        public bool isOneOfTheseDown(KeyPressed key1, KeyPressed key2, KeyPressed key3, KeyPressed key4)
        {
            return StatePlayer.isKeyDown(key1) || StatePlayer.isKeyDown(key2) || StatePlayer.isKeyDown(key3) || StatePlayer.isKeyDown(key4);
        }

        public BoxingPlayer StatePlayer
        {
            get
            {
                return player;
            }
            set
            {
                player = value;
            }
        }

        protected string StateName;

        public abstract void Initialize();
        public abstract void HandleMovement();
        public abstract void HandleDirection();
        public abstract void Update(GameTime gameTime);
        public abstract void HandleState();
        public abstract void HandleCollision(List<BoxingPlayer> Players);
        public abstract void Translate(float x, float y);
        public abstract void LoadState(BoxingPlayer player, Dictionary<string, Animation> ATextures);











    }
}
